package com.jintoufs.dao.role.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.jintoufs.dao.MyBatisSupport;
import com.jintoufs.dao.role.RoleDAO;
import com.jintoufs.domain.role.Role;
import com.jintoufs.domain.role.query.RoleQuery;

/**
 * 管理dao层接口实现
 * 
 *
 */
@Repository
public class RoleDAOImpl extends MyBatisSupport<RoleDAO, Role> implements RoleDAO {

	@Override
	public List<Role> getByFilter(Map<String, Object> params) {
		return getMapper().getByFilter(params);
	}

	@Override
	public List<Role> getSubRoles(String roleDesc) {
		return getMapper().getSubRoles(roleDesc);
	}

	@Override
	public boolean update(Role user) {
		return getMapper().update(user);
	}

	@Override
	public Integer insert(Role user) {
		return getMapper().insert(user);
	}

	@Override
	public Role queryById(Integer id) {
		return getMapper().queryById(id);
	}

	@Override
	public void delete(Integer id) {
		getMapper().delete(id);
	}

	@Override
	public Long queryCountByCondtion(RoleQuery queryObject) {
		return getMapper().queryCountByCondtion(queryObject);
	}

	@Override
	public List<Role> queryByCondtion(RoleQuery queryObject) {
		return getMapper().queryByCondtion(queryObject);
	}
}
